<?php
include 'config/dataSource.php';

if(isset($_GET['id'])){
    $executeQuery = "SELECT *FROM file WHERE fileID='{$_GET['id']}' AND isDeleted='f'";
    $getFileQuery = mysql_query($executeQuery);
    
        $row = mysql_fetch_assoc($getFileQuery);
        header("content-type: {$row['mime']}");
        ob_clean();
        flush();
        echo $row['data'];
        
    
                                                        
}


